/*    */ package net.sourceforge.appgen.model;
/*    */ 
/*    */ import java.util.Comparator;
/*    */ 
/*    */ public class PrimaryKeyFieldComparator
/*    */   implements Comparator<Field>
/*    */ {
/*    */   public int compare(Field o1, Field o2)
/*    */   {
/* 27 */     if ((o1.getPkPosition() <= 0) && (o2.getPkPosition() <= 0)) {
/* 28 */       return 0;
/*    */     }
/* 30 */     if ((o1.getPkPosition() <= 0) && (o2.getPkPosition() > 0)) {
/* 31 */       return 1;
/*    */     }
/* 33 */     if ((o1.getPkPosition() >= 0) && (o2.getPkPosition() <= 0)) {
/* 34 */       return -1;
/*    */     }
/*    */ 
/* 37 */     return o1.getPkPosition() - o2.getPkPosition();
/*    */   }
/*    */ }

/* Location:           C:\Users\lzl6066\Downloads\net.sourceforge.appgen_1.2.0\plugins\net.sourceforge.appgen_1.2.0.201002031718\
 * Qualified Name:     net.sourceforge.appgen.model.PrimaryKeyFieldComparator
 * JD-Core Version:    0.6.0
 */